import request from "@/utils/request";

/**
 * 消费订单列表
 * @param params
 * @returns
 */
export function getordersList(data) {
  return request({
    url: "/management/sale.sale_orders/getList",
    method: "post",
    data
  });
}

/**
 * 消费订单详情
 * @param params
 * @returns
 */
export function getordersDetails(data) {
  return request({
    url: "/management/sale.sale_orders/getDetails",
    method: "post",
    data
  });
}

/**
 * 消费订单退款
 * @param params
 * @returns
 */
export function getordersrefund(data) {
  return request({
    url: "/management/sale.sale_orders/refund",
    method: "post",
    data
  });
}

/**
 * 获取订单视频
 * @param params
 * @returns
 */
export function getOrderVideo(orderNo: string, status: string, me_id: number) {
  return request<{
    transaction_video: string;
  }>({
    url: "/management/sale.sale_orders/getTransactionVideo",
    method: "post",
    data: { trade_no: orderNo, status, me_id }
  });
}

/**
 * 导出销售订单列表
 * @param params
 * @returns
 */
export function exportsaleorders(data) {
  return request({
    url: "/management/sale.sale_orders/export",
    method: "post",
    data
  });
}

/**
 * 获取商品交易列表
 * @param params
 * @returns
 */
export function getsaleordersList(data) {
  return request({
    url: "/management/sale.sale_orders/getDetailsList",
    method: "post",
    data
  });
}

/**
 * 导出商品交易列表
 * @param params
 * @returns
 */
export function exportGoodsList(data) {
  return request({
    url: "/management/sale.sale_orders/exportGoodsList",
    method: "post",
    data
  });
}

/**
 * 获取订单退款列表
 * @param params
 * @returns
 */
export function getRefundList(data) {
  return request({
    url: "/management/sale.sale_orders/getRefundList",
    method: "post",
    data
  });
}
/**
 * 导出订单退款列表
 * @param params
 * @returns
 */
export function exportRefund(data) {
  return request({
    url: "/management/sale.sale_orders/exportRefund",
    method: "post",
    data
  });
}
